package com.hg.chapter2.beanLife;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

@Component
public class BeanAnnotation {

    public BeanAnnotation() {
        System.out.println("BeanAnnotation 初始化");
    }

    @PostConstruct
    public void init(){
        System.out.println("BeanAnnotation init");
    }

    @PreDestroy
    public void destroy(){
        System.out.println("BeanAnnotation destroy");
    }
}
